﻿using System;
using System.Windows.Forms;
using System.Globalization;
using System.Threading;

namespace PhoneManager
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
    
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            SharedLib.ModemGSM = new ModemGSM.Modem(Properties.Settings.Default.DefaultDelayCommand);
            if (!SingleApplication.IsAlreadyRunning())
            {
                do
                {
                    if (SharedLib.ReloadWithLanguage == "")
                    {
                        SharedLib.MainForm = new MDIPhoneManager();
                    }
                    else
                    {
                        SharedLib.MainForm = new MDIPhoneManager(SharedLib.ReloadWithLanguage);
                    }
                    Application.Run(SharedLib.MainForm);
                } 
                while (SharedLib.ReloadWithLanguage != "");
            }
        }
    }
}
